//
//  XDEmptyVCView.m
//  iPadAuditAuthorise
//
//  Created by XiangDongMBP on 16/9/9.
//  Copyright © 2016年 XiangDong. All rights reserved.
//

#import "XDEmptyVCView.h"

@interface XDEmptyVCView()

@end

@implementation XDEmptyVCView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self.refreshBtn addTarget:self action:@selector(refreshBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)refreshBtnTapped:(UIButton *)btn {
    if ([self.delegate respondsToSelector:@selector(xDEmptyVCView:refreshBtnTapped:)]) {
        [self.delegate xDEmptyVCView:self refreshBtnTapped:btn];
    }
}

- (void)showInView:(UIView *)view {
    if (self.superview) {
        return;
    }
    
    self.frame = view.bounds;
    [view addSubview:self];
}

- (void)hide {
    [self removeFromSuperview];
}

@end
